home *** CD-ROM | disk | FTP | other *** search
- Path: rover.ucs.ualberta.ca!news
- From: ryangall@gpu.srv.ualberta.ca (Bobby Sixkiller)
- Newsgroups: comp.lang.c
- Subject: Re: How to use Windows styles .INI file ?
- Date: 10 Jan 1996 07:39:01 GMT
- Organization: University of Alberta, Edmonton, Canada
- Message-ID: <4cvqel$s8s@pulp.ucs.ualberta.ca>
- References: <4ctnbk$6bb@senior.nectec.or.th> <1996Jan09.174451.1@gst-soft.demon.co.uk>
- NNTP-Posting-Host: async4-15.remote.ualberta.ca
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.99.2
-
- In article <1996Jan09.174451.1@gst-soft.demon.co.uk>,
- cwood@gst-soft.demon.co.uk says...
- >
- >> TITLE: How to use Windows styles .INI file ?
- >>
- >> +Subject : How to use Windows styles .INI file ?
- >> +From : senee@mozart.inet.co.th (Senee Wongpakdee)
- >> +Message-ID : <4ctnbk$6bb@senior.nectec.or.th>
- >> +Organization : Internet Thailand, Bangkok, Thailand.
- >>
- >> How can I read/write parameters from Windows style .INI file ? I can't
- >> find any source or library that says about this.
-
- I wrote a couple function that did this, basically, all I did was
- whenever I initialize a parameter in the file, I store the file *. That
- way whenever I want to acess it, I can connect to it directly...also when
- the program can't find a given parameter, I searches the file for it, and
- then if its found, stores the pointer, if not it either sends an error, or
- reinitializes a new parameter....If your having problems with always
- losing the pointer because new variables are addad all the time, you might
- want to give general locations such as location>=fp+500 and <fp+600. and
- search fro those points...its still pretty fast, especially if your file
- is looooooong. Try to keep within a couple hundered from the actual
- location.
-
- I store all the pointers in a data structure which I write to a file upon
- exit,(fwrite) and read from the file (fread) upon start. Its really
- simple, I hope this sort of helps...I cant find the code!
-
-
-